package com.rocky.project.model.family;

import java.util.Date;
import java.util.Set;

import com.rocky.project.model.base.BaseEntity;

/**
 * @hibernate.class  table = "t_archive" dynamic-insert = "true" dynamic-update = "true"
 */

public class Archive extends BaseEntity {
	private static final long serialVersionUID = 1L;
	Family family;	
	Set photos;//照片
	Set pics;//图纸
	Set archivePics;//历史档案
	Set files;//备注文档
	
	private String foundationArea;//建基面积
	private String constructionArea;//建筑面积	
	private String areanum;//地号
	private String areacard;//土地证号	
	private String autonum;//审批表号	
	private String owntype;//权属性质
	private String useful;//用途	
	
	
	
	private String familyJson;//家庭信息快照	
	private boolean latest = true;//是否为当前档案
	private Date snapTime;	
	
	/**
	 * @hibernate.property column = "c_latest" type = "boolean" not-null="false"
	 */
	
	public boolean isLatest() {
		return latest;
	}
	public void setLatest(boolean latest) {
		this.latest = latest;
	}
	/**
	 * @hibernate.many-to-one 
	 * column = "c_family_id" 
	 * cascade="none"	 
	 * not-null = "false"
	 */
	public Family getFamily() {
		return family;
	}
	public void setFamily(Family family) {
		this.family = family;
	}	

	/**
	 * @hibernate.set lazy = "true" readonly = "true" cascade = "none" order-by="id desc" inverse = "true" where="c_type=1"
	 * @hibernate.collection-key column = "c_archive_id"
	 * @hibernate.collection-one-to-many class="com.rocky.project.model.family.Attachment"
	 */		
	public Set getPhotos() {
		return photos;
	}
	public void setPhotos(Set photos) {
		this.photos = photos;
	}
	/**
	 * @hibernate.set lazy = "true" readonly = "true" cascade = "none" order-by="id desc" inverse = "true" where="c_type=2"
	 * @hibernate.collection-key column = "c_archive_id"
	 * @hibernate.collection-one-to-many class="com.rocky.project.model.family.Attachment"
	 */		
	public Set getPics() {
		return pics;
	}
	public void setPics(Set pics) {
		this.pics = pics;
	}
	
	/**
	 * @hibernate.set lazy = "true" readonly = "true" cascade = "all" order-by="id desc" inverse = "true" where="c_type=3"
	 * @hibernate.collection-key column = "c_archive_id"
	 * @hibernate.collection-one-to-many class="com.rocky.project.model.family.Attachment"
	 */	
	public Set getArchivePics() {
		return archivePics;
	}
	public void setArchivePics(Set archivePics) {
		this.archivePics = archivePics;
	}

	/**
	 * @hibernate.set lazy = "true" readonly = "true" cascade = "none" order-by="id desc" inverse = "true" where="c_type=4"
	 * @hibernate.collection-key column = "c_archive_id"
	 * @hibernate.collection-one-to-many class="com.rocky.project.model.family.Attachment"
	 */		
	public Set getFiles() {
		return files;
	}
	public void setFiles(Set files) {
		this.files = files;
	}
	
	/**
	 * @hibernate.property column = "c_construction_area" type = "string" 
	 */		
	public String getConstructionArea() {
		return constructionArea;
	}
	public void setConstructionArea(String constructionArea) {
		this.constructionArea = constructionArea;
	}
	
	/**
	 * @hibernate.property column = "c_foundation_area" type = "string" 
	 */		
	public String getFoundationArea() {
		return foundationArea;
	}
	public void setFoundationArea(String foundationArea) {
		this.foundationArea = foundationArea;
	}
	/**
	 * @hibernate.property column = "c_family_json" type = "string"  length="5000"
	 */		
	public String getFamilyJson() {
		return familyJson;
	}
	public void setFamilyJson(String familyJson) {
		this.familyJson = familyJson;
	}
	/**
	 * @hibernate.property column = "c_snap_time" type = "java.util.Date"
	 */	
	public Date getSnapTime() {
		return snapTime;
	}
	public void setSnapTime(Date snapTime) {
		this.snapTime = snapTime;
	}
	/**
	 * @hibernate.property column = "c_areacard" type = "string"
	 */		
	public String getAreacard() {
		return areacard;
	}
	public void setAreacard(String areacard) {
		this.areacard = areacard;
	}
	/**
	 * @hibernate.property column = "c_areanum" type = "string"
	 */		
	public String getAreanum() {
		return areanum;
	}
	public void setAreanum(String areanum) {
		this.areanum = areanum;
	}
	/**
	 * @hibernate.property column = "c_autonum" type = "string"
	 */		
	public String getAutonum() {
		return autonum;
	}
	public void setAutonum(String autonum) {
		this.autonum = autonum;
	}
	/**
	 * @hibernate.property column = "c_owntype" type = "string"
	 */		
	public String getOwntype() {
		return owntype;
	}
	public void setOwntype(String owntype) {
		this.owntype = owntype;
	}
	/**
	 * @hibernate.property column = "c_useful" type = "string"
	 */		
	public String getUseful() {
		return useful;
	}
	public void setUseful(String useful) {
		this.useful = useful;
	}	
	
}